home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Extra 1997 #1 / Amiga Plus Extra 1997 #1.iso / programme / grafik / video easel / camrexx / isingi.rexx < prev    next >
OS/2 REXX Batch file  |  1995-03-30  |  520b  |  21 lines

  1. /* Microcannonical Ising Model, by an idea of Toffoli, in CAMRexx by THOR */
  2.  
  3. MakeAlgorithm:
  4.    PLANEALGORITHM neumann hvphases
  5. return
  6.  
  7. MakePlane:
  8.    lattice=(horz=vert)
  9.    if phase=1 then   lattice=~lattice
  10.    /* handle only even or odd sublattice */
  11.    if lattice then; do
  12.       sum=north+south+east+west
  13.       if sum=2 then  new=~center             /* flip spin if two nbrs. */
  14.       else           new=center              /* else preserve */
  15.       SETPLANE new
  16.    end; else; do;
  17.       SETPLANE center
  18.    end
  19. return
  20.  
  21.